def typeof(variate):
    """ 判断变量类型的函数
    """
    type = None
    if isinstance(variate, int):
        type = "int"
    elif isinstance(variate, str):
        type = "str"
    elif isinstance(variate, float):
        type = "float"
    elif isinstance(variate, list):
        type = "list"
    elif isinstance(variate, tuple):
        type = "tuple"
    elif isinstance(variate, dict):
        type = "dict"
    elif isinstance(variate, set):
        type = "set"
    return type

def isset(dict_data, key):
    """ 判断该键是否存在
        :param dict_data:
        :param key:
        :return:
    """
    res = ('true' if key in dict_data else '')
    return res
